
import java.io.PrintWriter;
import java.util.HashMap;

class PrintStatement extends Statement {
	private Node print_list_;

	public PrintStatement(Node pl) {
		print_list_ = pl;
	}

	public void print(PrintWriter pw) {
		pw.println("Node name : PrintStatement");
		print_list_.print(pw);
	}

	@Override
	public String translate(HashMap<String, PrintWriter> pws, String condition, SymbolTable st,
			String parent) {
		String key = st.getStack().get(1);
		PrintWriter pw = pws.get(key);
		printIndent(pw, st.getLevel());
        pw.print("System.out.println( ");
		print_list_.translate(pws,null,st,null);
		pw.print(" )");
		return null;
	}
}